//
//  BCNLocalizationUtil.m
//  BCN Emergencies
//
//  Created by Ana Martínez on 12/15/11.
//  Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//

#import "BCNLocalizationUtil.h"
#import "BCNPrefs.h"

@implementation BCNLocalizationUtil

+ (NSString*) getLocalizatedStringWithKey:(NSString *)key {
    
    NSString *table;
    switch ([[BCNPrefs getInstance] language]) {
        case 0:
            table = @"Text_ca";
            break;
        case 1:
            table = @"Text_es";
            break;
        case 2:
            table = @"Text_en";
            break;
            
        default:
            table = @"Text_ca";
            break;
    }
    return NSLocalizedStringFromTable(key, table, @"No description");
}

@end
